 ///
 /// @file    test_iterator.cc
 /// @author  lemon(haohb13@gmail.com)
 /// @date    2016-03-17 15:01:09
 ///

#include "iterator.h"
#include <iostream>

using std::cout;
using std::endl;

int main(void)
{
	Aggregate * pAggregate = new ConcreateAggregate(4);
	Iterator * pIt = pAggregate->createIterator();

	for(;false == pIt->isDone(); pIt->next())
	{
		cout << pIt->currentItem() << endl;
	}
	cout << endl;

	return 0;
}
